<style>
tr, th, td {
    text-align: center;
}
</style>

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/TestData/testData" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="testData"/>
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel"/>
            <label>时间段<strong><span class="text-danger">*</span></strong>：</label>
            <input type="text" name="startTime" data-pattern="yyyy-MM-dd" value="${startTime}" data-toggle="datepicker"
                   placeholder="FROM" size="11" data-rule="required">
            <input type="text" name="endTime" data-pattern="yyyy-MM-dd" value="${endTime}" data-toggle="datepicker"
                   placeholder="TO" size="11" data-rule="required">&nbsp;
            <label>订单号：</label>
            <input type="text" name="docId" value="${docId}" size="15" placeholder="订单号"/>&nbsp;
            <label>箱号：</label>
            <input type="text" name="caseNum" value="${caseNum}" size="15" placeholder="箱号"/>&nbsp;
        %{--<g:select name="docId" from="${testDataDocId}" data-toggle="selectpicker" data-live-search="true" optionKey="doc_id" optionValue="doc_id" value="${docId}" noSelection="['':'ALL']" />&nbsp;--}%
            <label>整套IPN：</label>
            <input type="text" name="ipn" value="${ipn}" size="15" placeholder="整套IPN"/>&nbsp;
        %{--<g:select name="ipn" from="${testDataIpn}" data-toggle="selectpicker" data-live-search="true" optionKey="part_name" optionValue="part_name" value="${ipn}" noSelection="['':'ALL']" />&nbsp;--}%
            <label>部件VPN：</label>
            <input type="text" name="vpn" value="${vpn}" size="15" placeholder="部件VPN"/>
            %{--<g:select name="vpn" from="${testDataVpn}" data-toggle="selectpicker" data-live-search="true" optionKey="reserved6" optionValue="reserved6" value="${vpn}" noSelection="['':'ALL']" />&nbsp;--}%
            <br/><br/>
            <label>部件IPN：</label>
            <input type="text" name="svpn" value="${svpn}" size="15" placeholder="部件IPN"/>&nbsp;
        %{--<g:select name="svpn" from="${testDataSvpn}" data-toggle="selectpicker" data-live-search="true" optionKey="reserved7" optionValue="reserved7" value="${svpn}" noSelection="['':'ALL']" />&nbsp;--}%
            <label>刻印号：</label>
            <input type="text" name="kyh" value="${kyh}" size="15" placeholder="刻印号"/>&nbsp;
        %{--<g:select name="kyh" from="${testDataKyh}" data-toggle="selectpicker" data-live-search="true" optionKey="substrate_id1" optionValue="substrate_id1" value="${kyh}" noSelection="['':'ALL']" />&nbsp;--}%
            <label>客户LOT：</label>
            <input type="text" name="customerLot" value="${customerLot}" size="15" placeholder="客户LOT"/>&nbsp;
            <label>标签内容：</label>
            <g:select name="comment1" from="${testComment}" data-width="150" data-toggle="selectpicker"
                      data-live-search="true" optionKey="comment1" optionValue="comment1" value="${comment1}"
                      noSelection="['': '-- All --']"/>&nbsp;
            <label>订单状态：</label>
            <g:select name="state" from="${testDataState}" data-width="150" data-toggle="selectpicker"
                      data-live-search="true" optionKey="doc_status" optionValue="doc_status" value="${state}"
                      noSelection="['': '-- All --']"/>
            <br/><br/>
            <label>客户名称：</label>
            <g:select name="khmc" from="${testDataKhmc}" data-width="150" data-toggle="selectpicker"
                      data-live-search="true" optionKey="reserved1" optionValue="reserved1" value="${khmc}"
                      noSelection="['': '-- All --']"/>&nbsp;
            <label>清洗属性：</label>
            <g:select name="qxsx" from="${testDataQxsx}" data-width="150" data-toggle="selectpicker"
                      data-live-search="true" optionKey="reserved2" optionValue="reserved2" value="${qxsx}"
                      noSelection="['': '-- All --']"/>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue"
                    onclick="javascript:bjuiExportExl('#pagerForm', '${request.getContextPath()}/TestData/exportExcel')"
                    data-icon="file-excel-o" title="导出Excel">导出</button>
        </div>
    </form>
</div>

<div class="bjui-pageContent tableContent">
    <g:if test="${testData.size() > 0}">
        <table id="data" data-toggle="tablefixed" data-width="800%" data-nowrap="true">
            <thead>
            <tr id="t1">
                <th width="50">NO.</th>
                <g:each in="${tableHeadList}" status="j" var="headInstance">
                    <g:if test="${headInstance != 'CREATE_TIME' && headInstance != 'RN'}">
                        <th><g:message code="${headInstance}" default="${headInstance}"/></th>
                    </g:if>

                </g:each>
            %{--<g:each in="${countList}" var="count" status="i">
                <th>采集点${i+1}</th>
            </g:each>--}%
            </tr>
            </thead>
            <tbody>
            <g:each in="${testData}" status="i" var="dataInstance">
                <tr>
                    <td>${dataInstance.RN}</td>
                    <g:each in="${tableHeadList}" status="j" var="headInstance">
                        <g:if test="${headInstance != 'CREATE_TIME' && headInstance != 'RN'}">
                            <td>${dataInstance["${headInstance}"]}</td>
                        </g:if>
                    </g:each>
                </tr>
            </g:each>
            </tbody>
        </table>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel"/>
    </g:else>
</div>
<g:render template="../template/51pagination"/>